package cn.hennancf.picture.entities;

import java.io.File;

/**  
* @author  作者: 陈飞
* @date 创建时间：2017年3月12日 上午1:15:51 
* @version 1.0 
* @param name图片的名字
* @param createTime 创建时间
* @param URL 图片的路径
* @since  
* @return  
*/

public class Picture {
    private String name;
    private File url;
    private Long createTime;
    
    public Picture() {}
    
    public Picture(String name, File url, Long createTime) {
        super();
        this.name = name;
        this.url = url;
        this.createTime = createTime;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((createTime == null) ? 0 : createTime.hashCode());
        result = prime * result + ((name == null) ? 0 : name.hashCode());
        result = prime * result + ((url == null) ? 0 : url.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        Picture other = (Picture) obj;
        if (createTime == null) {
            if (other.createTime != null)
                return false;
        } else if (!createTime.equals(other.createTime))
            return false;
        if (name == null) {
            if (other.name != null)
                return false;
        } else if (!name.equals(other.name))
            return false;
        if (url == null) {
            if (other.url != null)
                return false;
        } else if (!url.equals(other.url))
            return false;
        return true;
    }

    @Override
    public String toString() {
        return "Picture [name=" + name + ", url=" + url + ", createTime=" + createTime + "]";
    }

    public Long getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public File getUrl() {
        return url;
    }
    public void setUrl(File url) {
        this.url = url;
    }
   

}
